Skip to content

Conversation

@scottmcm
Copy link
Member

@scottmcm scottmcm commented Dec 22, 2025

Spotted this in #148766's test changes. It doesn't seem like this ubcheck would catch anything useful; let's see if skipping it helps perf. (After all, this is inside every [] on a vec, among other things.)

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Dec 22, 2025
@scottmcm
Copy link
Member Author

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

@rust-bors

This comment has been minimized.

rust-bors bot added a commit that referenced this pull request Dec 22, 2025
Stop emitting UbChecks on every Vec→Slice
@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Dec 22, 2025
@rust-bors
Copy link
Contributor

rust-bors bot commented Dec 22, 2025

☀️ Try build successful (CI)
Build commit: d3405d7 (d3405d79c1b6f5617f04715f0b349c565c6a743d, parent: 000ccd651d6dfeab13f7703d92a5fd7a9ff7510f)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (d3405d7): comparison URL.

Overall result: ❌✅ regressions and improvements - please read the text below

Benchmarking this pull request means it may be perf-sensitive – we'll automatically label it not fit for rolling up. You can override this, but we strongly advise not to, due to possible changes in compiler perf.

Next Steps: If you can justify the regressions found in this try perf run, please do so in sufficient writing along with @rustbot label: +perf-regression-triaged. If not, please fix the regressions and do another perf run. If its results are neutral or positive, the label will be automatically removed.

@bors rollup=never
@rustbot label: -S-waiting-on-perf +perf-regression

Instruction count

Our most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.

mean range count
Regressions ❌
(primary)
1.6% [0.6%, 2.4%] 4
Regressions ❌
(secondary)
0.4% [0.0%, 2.3%] 7
Improvements ✅
(primary)
-1.4% [-6.0%, -0.1%] 28
Improvements ✅
(secondary)
-0.7% [-2.2%, -0.1%] 7
All ❌✅ (primary) -1.0% [-6.0%, 2.4%] 32

Max RSS (memory usage)

Results (primary 1.5%, secondary 1.9%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
3.8% [1.3%, 6.7%] 6
Regressions ❌
(secondary)
3.3% [0.9%, 6.1%] 14
Improvements ✅
(primary)
-5.4% [-7.2%, -3.5%] 2
Improvements ✅
(secondary)
-1.9% [-2.6%, -1.5%] 5
All ❌✅ (primary) 1.5% [-7.2%, 6.7%] 8

Cycles

Results (primary -1.0%, secondary -1.9%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
2.6% [2.3%, 2.8%] 2
Regressions ❌
(secondary)
2.3% [2.1%, 2.8%] 3
Improvements ✅
(primary)
-2.4% [-2.7%, -2.3%] 5
Improvements ✅
(secondary)
-4.0% [-6.5%, -2.1%] 6
All ❌✅ (primary) -1.0% [-2.7%, 2.8%] 7

Binary size

Results (primary -0.2%, secondary -0.5%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
0.2% [0.0%, 1.2%] 11
Regressions ❌
(secondary)
0.6% [0.0%, 1.2%] 2
Improvements ✅
(primary)
-0.3% [-0.9%, -0.0%] 64
Improvements ✅
(secondary)
-0.6% [-3.6%, -0.0%] 20
All ❌✅ (primary) -0.2% [-0.9%, 1.2%] 75

Bootstrap: 481.34s -> 483.129s (0.37%)
Artifact size: 390.37 MiB -> 390.63 MiB (0.07%)

@rustbot rustbot added perf-regression Performance regression. and removed S-waiting-on-perf Status: Waiting on a perf run to be completed. labels Dec 22, 2025
@scottmcm scottmcm marked this pull request as ready for review December 22, 2025 22:17
@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Dec 22, 2025
@rustbot rustbot removed the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Dec 22, 2025
@rustbot
Copy link
Collaborator

rustbot commented Dec 22, 2025

r? @ibraheemdev

rustbot has assigned @ibraheemdev.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@scottmcm
Copy link
Member Author

Reconfirming after rebasing, but should be basically the same
@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

@rust-bors

This comment has been minimized.

rust-bors bot added a commit that referenced this pull request Dec 22, 2025
Stop emitting UbChecks on every Vec→Slice
@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Dec 22, 2025
Comment on lines -103 to -105
fn not_equal(&self, other: &[B]) -> bool {
!self.equal(other)
}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Annot: nothing actually overrode this anywhere, so removed it in favour of the usual PartialEq::ne.

StorageLive(_38);
_36 = copy _29 as &[u8] (Transmute);
_38 = copy _28 as &[u8] (Transmute);
_7 = <[u8] as PartialEq>::eq(move _36, move _38) -> [return: bb19, unwind unreachable];
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

annot: note that we're still inlining the whole &String → &str → &u8 part (since it'll essentially disappear in LLVM), just stopping at <[_]>::eq which sharing at the MIR level is probably best.

@rust-bors
Copy link
Contributor

rust-bors bot commented Dec 23, 2025

☀️ Try build successful (CI)
Build commit: fa07ba2 (fa07ba28fd0d71635c2fcc8ab0cb7944dd5fea85, parent: 04813e4de86a5e024e71756ef092637aa862c984)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (fa07ba2): comparison URL.

Overall result: ❌✅ regressions and improvements - please read the text below

Benchmarking this pull request means it may be perf-sensitive – we'll automatically label it not fit for rolling up. You can override this, but we strongly advise not to, due to possible changes in compiler perf.

Next Steps: If you can justify the regressions found in this try perf run, please do so in sufficient writing along with @rustbot label: +perf-regression-triaged. If not, please fix the regressions and do another perf run. If its results are neutral or positive, the label will be automatically removed.

@bors rollup=never
@rustbot label: -S-waiting-on-perf +perf-regression

Instruction count

Our most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.

mean range count
Regressions ❌
(primary)
1.4% [0.3%, 2.6%] 5
Regressions ❌
(secondary)
0.6% [0.0%, 2.5%] 5
Improvements ✅
(primary)
-1.5% [-6.0%, -0.2%] 26
Improvements ✅
(secondary)
-0.6% [-2.0%, -0.1%] 10
All ❌✅ (primary) -1.0% [-6.0%, 2.6%] 31

Max RSS (memory usage)

Results (primary -0.1%, secondary 1.6%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
4.3% [2.1%, 5.4%] 3
Regressions ❌
(secondary)
3.5% [0.8%, 5.8%] 9
Improvements ✅
(primary)
-4.6% [-7.7%, -2.3%] 3
Improvements ✅
(secondary)
-1.7% [-2.2%, -1.4%] 5
All ❌✅ (primary) -0.1% [-7.7%, 5.4%] 6

Cycles

Results (primary -1.0%, secondary -1.4%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
2.2% [2.2%, 2.2%] 1
Regressions ❌
(secondary)
2.5% [2.2%, 2.9%] 3
Improvements ✅
(primary)
-2.6% [-2.8%, -2.3%] 2
Improvements ✅
(secondary)
-3.3% [-6.9%, -1.4%] 6
All ❌✅ (primary) -1.0% [-2.8%, 2.2%] 3

Binary size

Results (primary -0.2%, secondary -0.5%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
0.2% [0.0%, 1.2%] 8
Regressions ❌
(secondary)
0.6% [0.0%, 1.2%] 2
Improvements ✅
(primary)
-0.3% [-0.9%, -0.0%] 57
Improvements ✅
(secondary)
-0.6% [-3.7%, -0.0%] 20
All ❌✅ (primary) -0.2% [-0.9%, 1.2%] 65

Bootstrap: 481.395s -> 479.879s (-0.31%)
Artifact size: 390.31 MiB -> 390.61 MiB (0.08%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Dec 23, 2025
@scottmcm
Copy link
Member Author

With the tweak to the attribute location, let's double-check it again
@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

@rust-bors

This comment has been minimized.

rust-bors bot added a commit that referenced this pull request Dec 24, 2025
Stop emitting UbChecks on every Vec→Slice
@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Dec 24, 2025
@rust-bors
Copy link
Contributor

rust-bors bot commented Dec 24, 2025

☀️ Try build successful (CI)
Build commit: 1c6122f (1c6122f63ca256ab772930aae21c88b8f1e8467a, parent: 5a7ad8ee060eb429a28d844080cfe6938d550b19)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (1c6122f): comparison URL.

Overall result: ❌✅ regressions and improvements - please read the text below

Benchmarking this pull request means it may be perf-sensitive – we'll automatically label it not fit for rolling up. You can override this, but we strongly advise not to, due to possible changes in compiler perf.

Next Steps: If you can justify the regressions found in this try perf run, please do so in sufficient writing along with @rustbot label: +perf-regression-triaged. If not, please fix the regressions and do another perf run. If its results are neutral or positive, the label will be automatically removed.

@bors rollup=never
@rustbot label: -S-waiting-on-perf +perf-regression

Instruction count

Our most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.

mean range count
Regressions ❌
(primary)
1.6% [1.1%, 2.2%] 2
Regressions ❌
(secondary)
1.1% [0.1%, 2.1%] 2
Improvements ✅
(primary)
-1.4% [-5.8%, -0.1%] 26
Improvements ✅
(secondary)
-0.5% [-1.5%, -0.1%] 7
All ❌✅ (primary) -1.2% [-5.8%, 2.2%] 28

Max RSS (memory usage)

Results (primary 0.9%, secondary -3.3%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
3.7% [2.3%, 5.2%] 3
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-3.4% [-4.4%, -2.4%] 2
Improvements ✅
(secondary)
-3.3% [-3.3%, -3.3%] 1
All ❌✅ (primary) 0.9% [-4.4%, 5.2%] 5

Cycles

Results (primary -3.1%, secondary 1.3%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
4.2% [4.2%, 4.2%] 1
Improvements ✅
(primary)
-3.1% [-3.3%, -3.0%] 4
Improvements ✅
(secondary)
-1.6% [-1.6%, -1.6%] 1
All ❌✅ (primary) -3.1% [-3.3%, -3.0%] 4

Binary size

Results (primary -0.2%, secondary -0.3%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
0.2% [0.0%, 1.1%] 9
Regressions ❌
(secondary)
0.6% [0.0%, 1.1%] 2
Improvements ✅
(primary)
-0.3% [-0.9%, -0.0%] 60
Improvements ✅
(secondary)
-0.4% [-1.3%, -0.0%] 19
All ❌✅ (primary) -0.2% [-0.9%, 1.1%] 69

Bootstrap: 482.036s -> 484.285s (0.47%)
Artifact size: 392.48 MiB -> 392.35 MiB (-0.03%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Dec 24, 2025
Spotted this in PR148766's test changes.  It doesn't seem like this ubcheck would catch anything useful; let's see if skipping it helps perf.
@rustbot
Copy link
Collaborator

rustbot commented Jan 9, 2026

This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

@scottmcm
Copy link
Member Author

scottmcm commented Jan 9, 2026

@rustbot reroll

@rustbot rustbot assigned jhpratt and unassigned ibraheemdev Jan 9, 2026
@jhpratt
Copy link
Member

jhpratt commented Jan 9, 2026

@bors r+ rollup=never

@rust-bors rust-bors bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jan 9, 2026
@rust-bors
Copy link
Contributor

rust-bors bot commented Jan 9, 2026

📌 Commit c48df5d has been approved by jhpratt

It is now in the queue for this repository.

@rust-bors

This comment has been minimized.

@rust-bors rust-bors bot added the merged-by-bors This PR was explicitly merged by bors. label Jan 9, 2026
@rust-bors
Copy link
Contributor

rust-bors bot commented Jan 9, 2026

☀️ Test successful - CI
Approved by: jhpratt
Pushing 85d0cdf to main...

@rust-bors rust-bors bot merged commit 85d0cdf into rust-lang:main Jan 9, 2026
12 checks passed
@rustbot rustbot added this to the 1.94.0 milestone Jan 9, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Jan 9, 2026

What is this? This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.

Comparing 3fda0e4 (parent) -> 85d0cdf (this PR)

Test differences

Show 268 test diffs

268 doctest diffs were found. These are ignored, as they are noisy.

Test dashboard

Run

cargo run --manifest-path src/ci/citool/Cargo.toml -- \
    test-dashboard 85d0cdfe3489ff1a4b86daeddba6fcf82b47bd65 --output-dir test-dashboard

And then open test-dashboard/index.html in your browser to see an overview of all executed tests.

Job duration changes

  1. pr-check-1: 1529.9s -> 1916.3s (+25.3%)
  2. dist-apple-various: 4285.9s -> 3506.0s (-18.2%)
  3. x86_64-rust-for-linux: 2711.7s -> 3191.3s (+17.7%)
  4. x86_64-gnu-aux: 7576.7s -> 6612.3s (-12.7%)
  5. x86_64-gnu-tools: 3314.0s -> 3720.5s (+12.3%)
  6. x86_64-gnu-gcc: 3408.2s -> 3809.6s (+11.8%)
  7. x86_64-gnu-miri: 4477.3s -> 4972.6s (+11.1%)
  8. x86_64-gnu-llvm-21-1: 4122.5s -> 4526.0s (+9.8%)
  9. aarch64-gnu-debug: 3917.5s -> 4296.9s (+9.7%)
  10. aarch64-apple: 9532.5s -> 10434.1s (+9.5%)
How to interpret the job duration changes?

Job durations can vary a lot, based on the actual runner instance
that executed the job, system noise, invalidated caches, etc. The table above is provided
mostly for t-infra members, for simpler debugging of potential CI slow-downs.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (85d0cdf): comparison URL.

Overall result: ❌✅ regressions and improvements - please read the text below

Our benchmarks found a performance regression caused by this PR.
This might be an actual regression, but it can also be just noise.

Next Steps:

  • If the regression was expected or you think it can be justified,
    please write a comment with sufficient written justification, and add
    @rustbot label: +perf-regression-triaged to it, to mark the regression as triaged.
  • If you think that you know of a way to resolve the regression, try to create
    a new PR with a fix for the regression.
  • If you do not understand the regression or you think that it is just noise,
    you can ask the @rust-lang/wg-compiler-performance working group for help (members of this group
    were already notified of this PR).

@rustbot label: +perf-regression
cc @rust-lang/wg-compiler-performance

Instruction count

Our most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.

mean range count
Regressions ❌
(primary)
1.3% [0.1%, 2.6%] 3
Regressions ❌
(secondary)
2.5% [2.5%, 2.5%] 1
Improvements ✅
(primary)
-1.5% [-5.8%, -0.1%] 25
Improvements ✅
(secondary)
-0.5% [-1.4%, -0.1%] 6
All ❌✅ (primary) -1.2% [-5.8%, 2.6%] 28

Max RSS (memory usage)

Results (primary 1.5%, secondary 1.0%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
5.9% [3.1%, 10.5%] 4
Regressions ❌
(secondary)
3.6% [3.6%, 3.6%] 1
Improvements ✅
(primary)
-4.4% [-7.4%, -0.8%] 3
Improvements ✅
(secondary)
-1.6% [-1.6%, -1.6%] 1
All ❌✅ (primary) 1.5% [-7.4%, 10.5%] 7

Cycles

Results (primary -1.3%, secondary 1.0%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
2.6% [2.6%, 2.6%] 1
Regressions ❌
(secondary)
2.5% [2.5%, 2.5%] 2
Improvements ✅
(primary)
-2.6% [-2.9%, -2.4%] 3
Improvements ✅
(secondary)
-2.0% [-2.0%, -2.0%] 1
All ❌✅ (primary) -1.3% [-2.9%, 2.6%] 4

Binary size

Results (primary -0.3%, secondary -0.3%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
0.2% [0.0%, 1.1%] 5
Regressions ❌
(secondary)
0.4% [0.1%, 1.1%] 3
Improvements ✅
(primary)
-0.3% [-1.6%, -0.0%] 42
Improvements ✅
(secondary)
-0.5% [-1.3%, -0.0%] 14
All ❌✅ (primary) -0.3% [-1.6%, 1.1%] 47

Bootstrap: 474.629s -> 473.885s (-0.16%)
Artifact size: 390.98 MiB -> 390.84 MiB (-0.03%)

@scottmcm
Copy link
Member Author

scottmcm commented Jan 9, 2026

Wins clearly outweigh regressions here: check, debug, and doc are all green. opt is mixed -0.00% overall, with green for primary.

The one notable red is in syn-opt-full, which loses the gains it had in #148766, but I think overall this is still good. Might be interesting future work to see why it specifically got hit by this, though.

@rustbot label: +perf-regression-triaged

@rustbot rustbot added the perf-regression-triaged The performance regression has been triaged. label Jan 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merged-by-bors This PR was explicitly merged by bors. perf-regression Performance regression. perf-regression-triaged The performance regression has been triaged. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants